
import java.util.ListIterator;

public class PantallaAprobRepro extends javax.swing.JFrame {

    /** Creates new form PantallaAprobRepro */
    public PantallaAprobRepro() {
        initComponents();
        ListIterator<Alumno> it = MenuInicial.s.ListaAprobados().listIterator();
        Alumno a;
        String apellido;
        String nombre;
        String cedula;
        float nt;
        int j = 0;
        int i = 0;
        while (it.hasNext()) {
            a = it.next();
            apellido = a.getApellido();
            nombre = a.getNombre();
            cedula = a.getCedula();
            nt = a.getNota_Final();
            jTableaprobado.setValueAt(cedula, j, i);
            jTableaprobado.setValueAt(apellido, j, i + 1);
            jTableaprobado.setValueAt(nombre, j, i + 2);
            jTableaprobado.setValueAt(nt, j, i + 3);
            j++;
        }



        j = 0;
        i = 0;
        ListIterator<Alumno> it2 = MenuInicial.s.ListaReprobados().listIterator();
        while (it2.hasNext()) {
            a = it2.next();
            apellido = a.getApellido();
            nombre = a.getNombre();
            cedula = a.getCedula();
            nt = a.getNota_Final();
            jTableReprobado.setValueAt(cedula, j, i);
            jTableReprobado.setValueAt(apellido, j, i + 1);
            jTableReprobado.setValueAt(nombre, j, i + 2);
            jTableReprobado.setValueAt(nt, j, i + 3);
            j++;
        }






    }

    /** This method is called from within the constructor to
     * initialize the form.
     * WARNING: Do NOT modify this code. The content of this method is
     * always regenerated by the Form Editor.
     */
    @SuppressWarnings("unchecked")
    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
    private void initComponents() {

        jScrollPane2 = new javax.swing.JScrollPane();
        jTableReprobado = new javax.swing.JTable();
        jLabel11 = new javax.swing.JLabel();
        jLabel12 = new javax.swing.JLabel();
        jScrollPane3 = new javax.swing.JScrollPane();
        jTableaprobado = new javax.swing.JTable();

        setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);
        setAlwaysOnTop(true);
        getContentPane().setLayout(null);

        jTableReprobado.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Cedula", "Apellido", "Nombre", "Nota Final"
            }
        ));
        jScrollPane2.setViewportView(jTableReprobado);

        getContentPane().add(jScrollPane2);
        jScrollPane2.setBounds(60, 240, 479, 129);

        jLabel11.setText("7) Listar Estudiantes Aprobados");
        getContentPane().add(jLabel11);
        jLabel11.setBounds(60, 30, 250, 20);

        jLabel12.setText("8) Listar Estudiantes Aplazados");
        getContentPane().add(jLabel12);
        jLabel12.setBounds(70, 200, 250, 20);

        jTableaprobado.setModel(new javax.swing.table.DefaultTableModel(
            new Object [][] {
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null},
                {null, null, null, null}
            },
            new String [] {
                "Cedula", "Apellido", "Nombre", "Nota Final"
            }
        ));
        jScrollPane3.setViewportView(jTableaprobado);

        getContentPane().add(jScrollPane3);
        jScrollPane3.setBounds(60, 60, 479, 129);

        java.awt.Dimension screenSize = java.awt.Toolkit.getDefaultToolkit().getScreenSize();
        setBounds((screenSize.width-616)/2, (screenSize.height-438)/2, 616, 438);
    }// </editor-fold>//GEN-END:initComponents

    /**
     * @param args the command line arguments
     */
    public static void main(String args[]) {
        java.awt.EventQueue.invokeLater(new Runnable() {

            public void run() {
                new PantallaAprobRepro().setVisible(true);
            }
        });
    }
    // Variables declaration - do not modify//GEN-BEGIN:variables
    private javax.swing.JLabel jLabel11;
    private javax.swing.JLabel jLabel12;
    private javax.swing.JScrollPane jScrollPane2;
    private javax.swing.JScrollPane jScrollPane3;
    private javax.swing.JTable jTableReprobado;
    private javax.swing.JTable jTableaprobado;
    // End of variables declaration//GEN-END:variables
}
